<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/mytable/Fk_sjfs.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Fk_sjfs.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'sj_id',
                footer: "Foots",
                cnName: '实际发生额-SAP',
                name: 'mytable/Fk_sjfs',
                url: "/Fk_sjfs/",
                sortName: "sj_id"
            });
            const editFormFields = ref({"budat":"","docnr":"","racct":[],"hsl":"","drcrk":"","rcntr":[],"remark":""});
            const editFormOptions = ref([[{"title":"过账日期","field":"budat","type":"date"},
                               {"title":"会计凭证","field":"docnr","type":"text"},
                               {"dataKey":"fei_typelist","data":[],"title":"科目","field":"racct","type":"selectList"}],
                              [{"title":"金额","field":"hsl","type":"decimal"},
                               {"title":"借方/贷方","field":"drcrk","type":"text"},
                               {"dataKey":"cntr_all","data":[],"title":"成本中心/研发项目","field":"rcntr","type":"selectList"}],
                              [{"title":"凭证抬头文本","field":"remark","type":"text"}]]);
            const searchFormFields = ref({"budat":"","docnr":"","racct":[],"hsl":"","drcrk":"","rcntr":[],"remark":"","fytype":""});
            const searchFormOptions = ref([[{"title":"会计凭证","field":"docnr","type":"like"},{"dataKey":"fei_typelist","data":[],"title":"科目","field":"racct","type":"selectList"}],[{"title":"金额","field":"hsl","type":"decimal"},{"title":"借方/贷方","field":"drcrk","type":"text"},{"dataKey":"cntr_all","data":[],"title":"成本中心/研发项目","field":"rcntr","type":"selectList"},{"title":"过账日期","field":"budat","type":"date"}],[{"title":"凭证抬头文本","field":"remark","type":"like"},{"title":"ct成本中心pr项目","field":"fytype","type":"text"}]]);
            const columns = ref([{field:'sj_id',title:'sj_id',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'budat',title:'过账日期',type:'date',width:110,align:'left',sort:true},
                       {field:'docnr',title:'会计凭证',type:'string',link:true,width:110,align:'left'},
                       {field:'racct',title:'科目',type:'string',bind:{ key:'fei_typelist',data:[]},width:110,align:'left'},
                       {field:'hsl',title:'金额',type:'decimal',width:110,align:'left'},
                       {field:'drcrk',title:'借方/贷方',type:'string ',width:110,align:'left'},
                       {field:'rcntr',title:'成本中心/研发项目',type:'string',bind:{ key:'cntr_all',data:[]},width:110,align:'left'},
                       {field:'remark',title:'凭证抬头文本',type:'string',width:220,align:'left'},
                       {field:'fytype',title:'ct成本中心pr项目',type:'string',width:110,readonly:true,align:'left'},
                       {field:'ls_type',title:'auto自动插入',type:'string',width:110,readonly:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
